
import Router from 'vue-router'
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopCarContainer from './components/tabbar/ShopCarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import photoList from './components/photo/photoList.vue'
import photoInfo from './components/photo/photoInfo.vue'
import goodsList from './components/goods/goodsList.vue'
import goodsInfo from './components/goods/goodsInfo.vue'
import goodsDesc from './components/goods/goodsDesc.vue'
import goodsComments from './components/goods/goodsComments.vue'


var router = new Router({
    // mode: 'history',
    routes: [
      {
        path: '/',
        redirect: '/home'
      },
      {
        path: '/home',
        component: HomeContainer,
        // children: [
        //   {
        //     path: 'NewsList',
        //     component: NewsList
        //   }
        // ]
      },
      {
        path: '/member',
        component: MemberContainer
      },
      {
        path: '/shopcar',
        component: ShopCarContainer
      },
      {
        path: '/search',
        component: SearchContainer
      },
      {
        path: '/home/NewsList',
        component: NewsList
      },
      {
        path: '/homt/newsinfo/:id',
        component: NewsInfo
      },
      {
        path: '/home/photolist',
        component: photoList
      },
      {
        path: '/home/photoinfo/:id',
        component: photoInfo
      },
      {
        path: '/home/goodlist',
        component: goodsList
      },
      {
        name: 'goodsInfo',
        path: '/home/goodsinfo/:id',
        component: goodsInfo
      },
      {
        path: '/home/goodsdesc/:id',
        component: goodsDesc,
        name: 'goodsdesc'
      },
      {
        path: '/home/goodscomments/:id',
        component: goodsComments,
        name: 'goodscomments'
      }
    ],
    linkActiveClass: 'mui-active' //覆盖默认路由高亮的类，默认的是 router-link-active
  })

  export default router